﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter14.Code07.Code02
{
    using System.Timers;

    public class Demo
    {
        public static void Begin()
        {
            Timer myTimer = new Timer(100);
            myTimer.Elapsed += (source, e) =>
            {
                Console.WriteLine("Event handler called after {0} milliseconds.", (source as Timer).Interval);
            };
            Console.ReadLine();
        }
    }
}
